package com.cgx.config;

import org.I0Itec.zkclient.ZkClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author chenguanxin
 * @date 2020-09-05 21:06
 */
@Configuration
public class ZookeeperConfig {

    //  连接地址
    private static final String CONNECT_ADDR = "192.168.168.168:2181";


    @Bean
    public ZkClient initZookeeper() {
        ZkClient zkClient = new ZkClient(CONNECT_ADDR);
        return zkClient;
    }
}
